<%@ page import="java.util.Enumeration" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
  <title></title>
</head>
<body>
<%
  // 只有访问到ServletSession类再跳转
  // req.getRequestDispatcher("/view/servlet06/ServletSession.jsp").forward(req,resp);
  // 才有req信息打印
  // 直接访问这个jsp 没有req信息打印
  Object req = request.getAttribute("req");
  // 用其他浏览器访问这个jsp 没有getSession信息打印
  Object getSession = request.getSession().getAttribute("getSession");
  // 重启tomcat 没有getServletContext信息打印
  Object getServletContext = request.getServletContext().getAttribute("getServletContext");
  Object init = request.getServletContext().getAttribute("init");
  System.out.println(req);
  System.out.println(getSession);
  System.out.println(getServletContext);
  System.out.println(init);
%>
</body>
</html>
